<template>
  <div class="q-pa-md">
    <t-toggle v-model="menu" label="Menu state" />

    <t-btn-dropdown
      v-model="menu"
      class="glossy q-ml-lg"
      color="primary"
      label="Dropdown"
    >
      <t-list>
        <t-item clickable v-close-popup @click="onItemClick">
          <t-item-section avatar>
            <t-avatar icon="folder" color="primary" text-color="white" />
          </t-item-section>
          <t-item-section>
            <t-item-label>Photos</t-item-label>
            <t-item-label caption>February 22, 2016</t-item-label>
          </t-item-section>
          <t-item-section side>
            <t-icon name="info" color="amber" />
          </t-item-section>
        </t-item>

        <t-item clickable v-close-popup @click="onItemClick">
          <t-item-section avatar>
            <t-avatar icon="assignment" color="secondary" text-color="white" />
          </t-item-section>
          <t-item-section>
            <t-item-label>Vacation</t-item-label>
            <t-item-label caption>February 22, 2016</t-item-label>
          </t-item-section>
          <t-item-section side>
            <t-icon name="info" color="amber" />
          </t-item-section>
        </t-item>
      </t-list>
    </t-btn-dropdown>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        menu: ref(false),
        onItemClick() {
          // console.log('Clicked on an Item')
        },
      };
    },
  };
</script>
